package com.zqwh.xtool.api.online;

import com.zqwh.yj.sdk.utils.httpRequest.beans.HttpResult2;
import com.zqwh.xtool.domain.SyncData;
import com.zqwh.xtool.greendao.db.LendOrder;
import com.zqwh.xtool.greendao.db.LendOrderDetail;
import com.zqwh.xtool.greendao.db.Stock;
import com.zqwh.xtool.greendao.db.User;

import java.util.List;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

public interface SyncApi {
    /**
     * 获取离线模式所需数据
     * @return
     */
    @GET("sync")
    Observable<HttpResult2<SyncData>> getSyncData(@Query("sn") String sn);

    /**
     * 获取离线模式借出单详情数据
     * @return
     */
    @POST("sync")
    Observable<HttpResult2<Object>> setSyncData(@Body RequestBody content);



    /**
     * 获取离线模式用户数据
     * @return
     */
    @GET("sync/user/list")
    Observable<HttpResult2<List<User>>> getSyncUserList(@Query("devId") Long devId);

    /**
     * 获取离线模式库存数据
     * @return
     */
    @GET("sync/stock/list")
    Observable<HttpResult2<List<Stock>>> getSyncStockList(@Query("devId") Long devId);


    /**
     * 获取离线模式借出单数据
     * @return
     */
    @GET("sync/lend-order/list")
    Observable<HttpResult2<List<LendOrder>>> getSyncLendOrderList(@Query("devId") Long devId);

    /**
     * 获取离线模式借出单详情数据
     * @return
     */
    @GET("sync/lend-order-detail/list")
    Observable<HttpResult2<List<LendOrderDetail>>> getSyncLendOrderDetailList(@Query("devId") Long devId);


}
